package com.legrand.www.module;

//import com.legrand.www.module.filter.ErrorFilter;
import com.legrand.www.module.filter.FeignZuulFilter;
import com.legrand.www.module.filter.MyZuulFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
/**
*@author xiah
*2018-06-22 09:50:54
*/

@SpringBootApplication
@EnableEurekaClient
@EnableZuulProxy
public class ApiGatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(ApiGatewayApplication.class, args);
    }

    @Bean
    public MyZuulFilter makeMyFilterBean() {
        return new MyZuulFilter();
    }

    @Bean
    public FeignZuulFilter makeMyFilterBean2() {
        return new FeignZuulFilter();
    }

   /* @Bean
    public ErrorFilter makeMyFilterBean3() {
        return new ErrorFilter();
    }*/
}
